//
//  BaseViewController.h
//  XHNShangChengMoBan
//
//  Created by 张铁军 on 16/8/13.
//  Copyright © 2016年 ping. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface BaseViewController : UIViewController
{
    float _kscH;
    float _kscW;
}
@property(nonatomic,assign)int b;
@property(nonatomic,strong)UIView       *HeaderView;
@property(nonatomic,strong)UIView       *setNav_view;
@property(nonatomic,strong)UILabel      *titleL;
@property(nonatomic,strong)UIButton      *rightBtn;
//添加头片
-(UIImageView *)addNoneSearch;
-(UIImageView *)addNoneGoodslist;
-(UIImageView *)addNoneShoppingCart;

//显示菊花
- (void)hideHUD;
- (void)showHUDWithString:(NSString *)string;
//只显示文字(文字菊花)
- (void)showWithTitle:(NSString *)title;

-(void)ksc;

- (NSString*)dictionaryToJson:(NSDictionary *)dic;


-(void)setNavTitleText:(NSString *)title;

-(void)setNavBackgroundWhiteColorTitleText:(NSString *)title;

-(void)setNavgationTitle:(NSString *)string;

-(void)setNavBackgroundImageTitleText:(NSString *)title;

//返回按钮
-(void)drawBackButton;

//倒计时按钮
- (void)startTime:(UIButton *)VerificationCodeButton;
//json转字典
-(NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

//保存数据到缓存中
-(void)setCacheFileName:(NSString *)string andSaveType:(NSArray *)array;
//获取缓存路径
-(NSString *)getCacheFilePath:(NSString *)string;
//设置键盘
-(void)setKeyboard;
//取消键盘设置
-(void)cancalKeyboard;

-(void)callServicePhone:(NSString *)str;

-(void)setRightBtnWithName:(NSString *)title;


- (float)widthForString:(NSString *)value fontSize:(float)fontSize;//高度固定20
- (float)heightForString:(NSString *)value fontSize:(float)fontSize andWidth:(float)width;

#pragma mark- 四舍五入
-(NSString*)notRounding:(double)price afterPoint:(NSInteger)position;
//double转String
-(NSString *)doubleToString:(double)doubleNum;
/**
 富文本改变字体

 @param string 整体要传入的字符串
 @param font 要改变的字体 font
 @param planceStr 要改变的字体
 @param lable 改变的label
 */
-(void)attributedStringSourceString:(NSString *)string andFont:(UIFont *)font andPlanceString:(NSString *)planceStr andSourceLabel:(UILabel *)lable;



@end
